package Thread;
//匿名内部类重写run方法
public class dome3 {
    public static void main(String[] args) {
        Thread t = new Thread(){
            public void run() {
                for (int i = 0; i < 5; i++) {
                    System.out.println("线程启动");
                }
            }
        };
        t.start();
        for (int i = 0; i < 50; i++) {
            System.out.println("主线程启动");
        }
    }
}
